package com.version.manager.model;

import java.util.List;

public class TableResultResponse<T> {
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    // 状态码
    private int status;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private String message;

    public TableData<T> getData() {
        return data;
    }

    public void setData(TableData<T> data) {
        this.data = data;
    }

    TableData<T> data;
    public TableResultResponse(long total,List<T> rows){
        this.status=200;
        this.message="";
        this.data=new TableData<>(total,rows);
    }





    class TableData<T>{
        long total;
        List<T> rows;
        public TableData(long total,List<T> rows){
            this.total=total;
            this.rows=rows;
        }
        public TableData() {
        }

        public long getTotal() {
            return total;
        }

        public void setTotal(long total) {
            this.total = total;
        }

        public List<T> getRows() {
            return rows;
        }

        public void setRows(List<T> rows) {
            this.rows = rows;
        }
    }
}
